<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>进制转化</title>
</head>
<body>
    <script>
        var num =10;
        cansole.log(num.toString());//"10"
        cansole.log(num.toString(2));//"1010"
        cansole.log(num.toString(8));//"12"
        cansole.log(num.toString(16));//"a"
        var n =255
        cansole.log(num.toString(16));//"a"
    </script>

    
</body>
</html>